import instance from '@/http/request.js'
// 获取用户列表
export function getuserlist(data) {
    return instance({
        url: '/api/users',
        method: 'get',
        params: data
    })
}

// 添加用户
export function addUserFn(data) {
    return instance({
        url: '/api/users/add',
        method: 'post',
        data
    })
}

// 编辑用户
export function editUserFn(data) {
    return instance({
        url: `/api/users/${data.id}`,
        method: 'PUT',
        data
    })
}


// 删除用户
export function delUserFn(data) {
    return instance({
        url: `/api/users/${data.id}`,
        method: 'DELETE',
        data
    })
}
